﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetworkingLibrary.Utilities.UDP
{
    /// <summary>
    /// Message communication (sending/receiving) modes for UDP. NO MESSAGE MODE GARUNTEES NO DUPLICATES.
    /// </summary>
    public enum UDPMessagingMode
    {
        /// <summary>
        /// USed in messages that are not sent over UDP.
        /// </summary>
        NotUDP,
        /// <summary>
        /// This is just UDP. Messages can be lost or received more than once. Messages may not be received in the same order as they were sent.
        /// </summary>
        UnreliableUnordered,
        /// <summary>
        /// Using this delivery method messages can still be lost; but you're protected against duplicated messages. 
        /// If a message arrives late; that is, if a message sent after this one has already been received - it will be dropped. 
        /// This means you will never receive "older" data than what you already have received.
        /// </summary>
        UnreliableSequenced,
        /// <summary>
        /// This delivery method ensures that every message sent will be eventually received. 
        /// It does not, however, guarantee what order they will be received in; late messages may be delivered after newer ones.
        /// </summary>
        ReliableUnordered,
        /// <summary>
        /// This delivery method is similar to UnreliableSequenced; except that it guarantees that SOME messages will be received. 
        /// If you only send one message - it will be received. If you sent two messages quickly, and they get reordered in transit, only the newest message will be received 
        /// but at least ONE of them will be received.
        /// </summary>
        ReliableSequenced,
        /// <summary>
        /// This delivery method guarantees that messages will always be received in the exact order they were sent.
        /// </summary>
        ReliableOrdered
    }
}
